# coding: utf-8
import xadmin

from .models import chatRecord, chatRoom


class chatRoomAdmin(object):
    list_display = ['onceNameOne', 'onceNameTwo', 'secret', 'isDelete']
    search_fields = ['onceNameOne', 'onceNameTwo', 'secret', 'isDelete']
    list_filter = ['onceNameOne', 'onceNameTwo', 'secret', 'isDelete']


class chatRecordAdmin(object):
    list_display = ['chatRoom', 'currentUser', 'content', 'time', 'isDelete']
    search_fields = ['chatRoom', 'currentUser', 'content', 'time', 'isDelete']
    list_filter = ['chatRoom', 'currentUser', 'content', 'time', 'isDelete']


xadmin.site.register(chatRoom, chatRoomAdmin)
xadmin.site.register(chatRecord, chatRecordAdmin)
